import java.util.*;

class t33 {
    public int a;
    public int b;
    public int c;

    public t33(int a, int c) {
        this.a = a;
        this.c = c;
    }
}
class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;
    TreeNode() {};
    TreeNode(int val) {
        this.val = val;
    }
}
public class test {
    public static float tst() {
        //int i = 3;//true
        long i = 3;//true
        //short i = 3;//true
        //double i = 3;//false
        return i;
    }
    //交换排序
    public static void selectSort2(int[] array) {
        int left = 0;
        int right = array.length-1;
        int i = 0;

        while (left < right) {
            //i  minIndex   maxIndex
            int minIndex = left;
            int maxIndex = right;
            for (int j = left + 1; j < right; j++) {//找出最小和最大
                if (array[maxIndex] < array[j]) {
                    maxIndex = j;
                }
                if (array[minIndex] > array[j]) {
                    minIndex = j;
                }
            }
            swap(array,minIndex,left);//把最小值换到最前面
            if (maxIndex == left) {//防止-> 假如最前面的是最大值,当最小值跟最前面的进行交换后,会获得错误的最大值坐标
                maxIndex = minIndex;
            }
            swap(array,maxIndex,right);//把最大值换到最后面
            left++;//缩小区间
            right--;
        }
    }
    //直接选择排序
    public static void selectSort(int[] array) {
        for (int i = 0; i < array.length; i++) {
            int minIndex = i;//最小值的下标
            for (int j = i + 1; j < array.length; j++) {
                if (array[j] < array[minIndex]) {
                    minIndex = j;
                }else {
                    break;
                }
            }
            swap(array,minIndex,i);//把最小的值换到前面
        }
    }
    public static void swap(int[] array, int l, int r) {
        int cmp = array[l];
        array[l] = array[r];
        array[r] = cmp;
    }
    /*
    判断一棵树是不是完全二叉树
    */
    public boolean isCompleteTree(TreeNode root) {
        Queue<TreeNode> queue = new LinkedList<>();
        queue.offer(root);
        while(!queue.isEmpty()) {//层序遍历
            TreeNode cur = queue.poll();
            if (cur == null) {//判断是否为完全二叉树
                while(!queue.isEmpty()) {
                    if(queue.poll() != null) {
                        return false;
                    }
                }
                return true;
            }
            queue.offer(cur.left);
            queue.offer(cur.right);
        }
        return false;
    }
    public static class Inc {
        public static void main(String[] args) {
            Inc inc = new Inc();
            int i = 0;
            inc.fermin(i);
            i = i++;
            System.out.println(i);
        }

        void fermin(int i) {
            i++;
        }
    }
    /*
    public static void main(String[] args) {
        int[][] arr = new int[3][];
        arr[0] = new int[]{1,2,3,4,5};
        arr[1] = new int[]{1,2,3};
        arr[2] = new int[]{1,2,3,4};
        System.out.println(Arrays.deepToString(arr));
        int[] arr = new int[3];
        arr[1] = 2;
        arr[2] = 3;
        System.out.println(Arrays.toString(arr));

    }*/

}
